package com.example.treasure_back.controller;

import com.example.treasure_back.entity.MsgEntity;
import com.example.treasure_back.model.DailySentenceModel;
import com.example.treasure_back.service.DailySentenceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/treasure/daily")
public class DailySentenceController {

    @Autowired
    private DailySentenceService dailySentenceService;

    @RequestMapping("/getDailySentence")
    public MsgEntity getDailySentence(){
        DailySentenceModel dailySentence = dailySentenceService.getDailySentence();
        return new MsgEntity("SUCCESS","200",dailySentence);
    }
}
